Skip to content

Bound tab recency sync pressure#332

Merged
danshapiro merged 1 commit into
mainfrom
pr/tab-recency-minute-resolution
May 18, 2026
Merged

Bound tab recency sync pressure#332
danshapiro merged 1 commit into
mainfrom
pr/tab-recency-minute-resolution

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

Summary

  • Move terminal tab recency into a minute-bucketed sidecar instead of mutating tab layout state per keystroke.
  • Derive local and remote tab recency from current terminal pane activity, with legacy lastInputAt compatibility and no updatedAt activity fallback.
  • Add pruning/persistence/cross-tab sync coverage so stale pane recency is not resurrected.
  • Keep the small MCP guidance escaping fix that unblocked the e2e production build path.

Verification

  • FRESHELL_TEST_SUMMARY="tab recency minute resolution dev landing" npm run check passed on the dev-based landing candidate /home/user/code/freshell/.worktrees/tab-recency-minute-resolution-dev at 6adca421.
  • Focused browser e2e covered rapid terminal input sending bounded tabs.sync.push messages.

Dev Landing

  • Landed on dev as 6adca421 feat: bound tab recency sync pressure and pushed to origin/dev.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d32b8853f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/store/crossTabSync.ts
Comment on lines +280 to +285
store.dispatch({
...prunePaneTabActivityToLiveTerminalPanes({
paneIds: collectLiveTerminalPaneIds(store.getState()),
}),
meta: { source: 'cross-tab' },
})
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip persisting cross-tab recency prune echoes

When a TAB_RECENCY_STORAGE_KEY event arrives, we merge the remote payload and then dispatch prunePaneTabActivityToLiveTerminalPanes without meta.skipPersist. In multi-tab use where each tab has different live pane IDs, this causes each tab to immediately rewrite the sidecar to its own pane set, broadcasting a new storage value that the other tab then rewrites back, creating an ongoing ping-pong of localStorage writes/broadcasts and unnecessary sync traffic.

Useful? React with 👍 / 👎.

@danshapiro danshapiro force-pushed the pr/tab-recency-minute-resolution branch from 5d32b88 to 0e117be Compare May 18, 2026 21:57
@danshapiro danshapiro merged commit 4388903 into main May 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant